package com.itheima.Demo01.demo02;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateTest01 {
    public static void main(String[] args) throws ParseException {
        String birthday ="2004-10-1";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date parse = sdf.parse(birthday);

        long Wotime = parse.getTime();



        Date date = new Date();
        long XZtime = date.getTime();
        long l = (XZtime-Wotime ) / 1000 / 3600 / 24;
        System.out.println(l);

    }
}
